From 668349f38be79d2bd197ff968d728090f6d14faa Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Thu, 2 Oct 2008 11:32:08 +0100 Subject: [PATCH] xc_ptrace: Allow gdbserver to connect to a guest before APs are brought online. Signed-off-by: Kip Macy Signed-off-by: Keir Fraser --- tools/libxc/xc_ptrace.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/libxc/xc_ptrace.c b/tools/libxc/xc_ptrace.c index 09d5c656d5..fa6c3a0ad1 100644 --- a/tools/libxc/xc_ptrace.c +++ b/tools/libxc/xc_ptrace.c @@ -112,17 +112,16 @@ static int get_online_cpumap(int xc_handle, struct xen_domctl_getdomaininfo *d, uint64_t *cpumap) { - int i, online, retval; + int i, online; *cpumap = 0; for (i = 0; i <= d->max_vcpu_id; i++) { - if ((retval = fetch_regs(xc_handle, i, &online))) - return retval; + fetch_regs(xc_handle, i, &online); if (online) *cpumap |= (1 << i); } - - return 0; + + return (*cpumap == 0) ? -1 : 0; } /* -- 2.30.2